package com.yunxin.customui.bean.table.datatable;

import com.yunxin.customui.bean.table.TableConfig;
import com.yunxin.tools.commonenum.HeaderMergeEnum;
import com.yunxin.tools.commonenum.MergeSelectEnum;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * 功能描述:
 *     用户自定义表格信息bean
 * date 2021/8/2 11:24
 *
 * @author cc
 * @version 1.0
 */
@Getter
@Setter
public class TableBusinessConfig extends TableConfig implements Serializable {



    /**
     * 表格数据源类型 原始/统计
     */
    String tableDataType;


    //合并方式
    @Setter(AccessLevel.NONE)
    String mergeType;

    public TableBusinessConfig() {

    }

    public void setMergeType(String mergeType){
        this.mergeType = mergeType;
        MergeSelectEnum headerEnum = MergeSelectEnum.valueOf(mergeType);
        this.mergeEnums = headerEnum.getHeaderEnum();
    }

    String businessGroup;






    /**
     * 表格对应的下拉框选项
     */
    String select;

    //表格的url后缀
    String tableUrl;

    /**
     * 用户已经选择的列
     */
    List<TableDataTemplate> tableDataTemplates;

    private HeaderMergeEnum[] mergeEnums;

}
